function reservation(id, type) {
    var url = servletUrl + "/OrderHotelServlet?id=" + id;

    var days = prompt("请输入要预定的天数")

    if(days == null || days == '') {
        return;
    }

    $.ajax({
        url: servletUrl + "/OrderServlet",
        data: {
            HotelId: id,
            HotelType: type,
            HotelDays: days
        },
        text:"text",
        method:"get",
        success: function (data) {
            if(data === "false") {
                alert("预定失败，房间剩余量为0")
            } else {
                alert("预定成功")
            }
            location.href = url
        }
    })
}